package com.java_senior_5;

import java.util.Comparator;

public class Com implements Comparator<Student> {




    @Override
    public int compare(Student o1, Student o2) {
        int result = (int)(o1.getScore()-o2.getScore());
        if(result==0){
            result = o2.getAge()-o1.getAge();
        }
        return  result;

    }


}
